<script lang="ts" setup>
let list = defineProps({
    child: {} as any
});

</script>

<template>
    <ul class="sub-menu">
        <template v-for="item in list.child">
            <li :class='item.attribute+" "+"sub-menu-item"'>
                <a :href='item.path' :title='item.name'>{{ item.name }}</a>
                <ul v-if='item.children.length !== 0' class='sub-menu'>
                    <template v-for='items in item.children'>
                        <li :class='items.attribute'>
                            <a :href='items.path' aria-current="page" id='menu-item-children'
                               :target='items.target ===1 ? "_blank":""'>{{ items.name }}</a>
                        </li>
                    </template>
                </ul>
            </li>
        </template>
    </ul>
</template>
